//
//  GWBaseApiManager.h
//  OMCUVideo
//
//  Created by dvt04 on 2017/6/21.
//  Copyright © 2017年 sumavision. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, GWRequestMethod) {
    GWPost = 1,
    GWGet = 2,
};

typedef void(^GWSuccessBlock)(NSURLSessionDataTask *task ,id data);
typedef void(^GWFailureBlock)(NSURLSessionDataTask *task, NSError *error);

NSString * const GWA7ServerUrl = @"";
NSString * const GWM1ServerUrl = @"";

NSString * const XMLHeader = @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";


@interface GWBaseApiManager : NSObject

- (NSURLSessionDataTask *)requestData_WithGet_ServerUrl:(NSString *)serverUrl
                                                apiPath:(NSString *)apiPath
                                             withParams:(NSDictionary *)paramsDic
                                                success:(GWSuccessBlock)success
                                                failure:(GWFailureBlock)failure;

- (NSURLSessionDataTask *)requestData_WithPost_ServerUrl:(NSString *)serverUrl
                                                 apiPath:(NSString *)apiPath
                                              withParams:(NSDictionary *)paramsDic
                                          withBodyParams:(id)bodyParamsObj
                                                 success:(GWSuccessBlock)success
                                                 failure:(GWFailureBlock)failure;

@end
